package com.wl.eb.service;

import com.wl.eb.mapper.EbUserMapper;
import com.wl.eb.module.EbUser;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.UUID;


@Service
public class RegistService {
    @Resource
    private EbUserMapper ebUserMapper;

    public boolean regist(EbUser ebUser){
        //添加用户ID
        String userId = UUID.randomUUID().toString().replace("-","").substring(0, 10);
        ebUser.setEuUserId(userId);
        //添加用户状态   默认普通用户
        ebUser.setEuStatus(1);
        int result = ebUserMapper.insert(ebUser);
        return result>0?true:false;
    }
}
